package cn.wolfcode.cms.mapper;

import cn.wolfcode.cms.domain.OrderBill;
import cn.wolfcode.cms.domain.Product;
import cn.wolfcode.cms.domain.Stock;
import cn.wolfcode.cms.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StockMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Stock record);

    Stock selectByPrimaryKey(Long id);

    List<Stock> selectAll();

    int updateByPrimaryKey(Stock record);

    List<Stock> queryForList(QueryObject qo);

    int queryForCount(QueryObject qo);


    Stock getProductByItem(String name);

    void newUpdateByPrimaryKey(Stock currentStock);


    List<Long> listId();

    void updateData(@Param("stock") Stock entity, @Param("newStockNumber") Integer newStockNumber);
}